Compiling Constraint Handling Rules into Prolog with Attributed Variables
نویسندگان
چکیده
We introduce the most recent and advanced implementation of constraint handling rules (CHR) in a logic programming language, which improves both on previous implementations (in terms of completeness , exibility and eeciency) and on the principles that should guide such a Prolog implementation consisting of a runtime system and a compiler. The runtime system utilizes attributed variables for the realization of the constraint store with eecient retrieval and update mechanisms. Rules describing the interactions between constraints are compiled into Prolog clauses by a multi-phase compiler, the core of which comprises a small number of compact code generating templates in the form of deenite clause grammar rules.
منابع مشابه
Translating Constraint Handling Rules into Action Rules
CHR is a popular high-level language for implementing constraint solvers and other general purpose applications. It has a wellestablished operational semantics and quite a number of different implementations, prominently in Prolog. However, there is still much room for exploring the compilation of CHR to Prolog. Nearly all implementations rely on attributed variables. In this paper, we explore ...
متن کاملA compilation schema from Constraint Handling Rules into Action Rules
CHR is a popular high-level language for implementing constraint solvers and other general purpose applications. It has a well-established operational semantics and quite a number of different implementations, prominently in Prolog. However, there is still much room for exploring the compilation of CHR to Prolog. Nearly all implementations rely on attributed variables. In this paper, we explore...
متن کاملCompiling Constraint Handling Rules
We introduce the most recent and advanced implementation of CHR which improves both on previous implementations (in terms of completeness, ex-ibility and eeciency) and on the principles that should guide such an implementation. The idea is to have three rather independent phases of the compiler that utilize templates to generate the code and macros to specialize it. Moreover, our new implementa...
متن کاملThe K.U.Leuven CHR System: Implementation and Application
We present the K.U.Leuven CHR system: what started out as a validation of a new attributed variables implementation, has become a part of three different Prolog systems with an increasing userbase. In this paper we highlight the particular implementation aspects of the K.U.Leuven CHR system, and a few CHR applications that we have built with our system.
متن کاملCompiling Constraint Handling Rules to Java: A Reconstruction
In this report, we provide a detailed description of the compilation scheme the K.U.Leuven JCHR system uses to compile CHR to efficient Java code. We start from a relatively straightforward adaptation of the traditional CHR compilation scheme for Prolog, and gradually add all its basic optimizations. Next, we show why this compilation scheme is not suited for compilation to an imperative host l...
متن کامل